﻿#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QMouseEvent>
#include <QPropertyAnimation>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

    void setIconAndText(const QString& btIcon, const QString& btText, int pageId);

    int getPageId()const;

    void clearbackGroundColor();

    void initPropertyAnimation();

    void showAnimation(bool isShow);

signals:
    void btClick(int id);

protected:
    virtual void mousePressEvent(QMouseEvent *event);

private:
    Ui::BtForm *ui;
    int _pageId;
    QPropertyAnimation *line1;
    QPropertyAnimation *line2;
    QPropertyAnimation *line3;
    QPropertyAnimation *line4;

};

#endif // BTFORM_H
